package com.showcai.web.service;

import com.github.pagehelper.PageInfo;
import com.showcai.module.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by Baggio on 2018-6-25.
 */
@FeignClient(name = "service-user",fallback=UserServiceClientBack.class)
public interface UserServiceClient {

  @RequestMapping(value="/user/get/{id}",method= RequestMethod.POST)
  User getUser(@PathVariable("id") Long id) throws Exception;
  @RequestMapping(value="/user/userList",method= RequestMethod.POST)
  List<User> getUserList(@RequestParam("map")  Map<String, String> map)  throws Exception;
  @RequestMapping(value="/user/getUserListPageInfo",method= RequestMethod.POST)
  PageInfo getUserListPageInfo(@RequestParam("map")  Map<String, String> map) throws Exception;


}
